package com.qf.controller;

import com.qf.entity.Subject;
import com.qf.service.SubjectService;
import com.qf.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author cuicui
 * @Description
 * @Date 2025-8-16
 */
@RestController
public class SubjectController {
    @Autowired
    private SubjectService subjectService;

    @GetMapping("subject/findSubjectById")
    public R findSubjectById(int id) {
        Subject subject = subjectService.findSubjectById(id);
        return R.success(subject);
    }
}
